<template>
  <el-dialog :visible.sync="visible" title="企业信息" width="30%" :destroyOnClose="true" :keyboard="false">
    <div>
      <el-form :model="formData" ref="formData" name="basic" label-width="80px" autocomplete="off">
        <el-form-item label="公司简称" name="companyShort">
          <el-input v-model="formData.companyShort"/>
        </el-form-item>
        <el-form-item label="公司全称" name="companyName">
          <el-input v-model="formData.companyName"/>
        </el-form-item>
        <el-form-item label="营业执照" name="password">
          <el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple>
            <i class="el-icon-upload"></i>
            <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
          </el-upload>
        </el-form-item>
      </el-form>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="handleCancel">取 消</el-button>
      <el-button type="primary" @click="handleOk">确 定</el-button>
    </span>

  </el-dialog>
</template>

<script>
export default {
  components: {},
  props: {},
  data() {
    return {
      activeName: 'first',
      formRef: null,
      formData: {},
      visible: false,
    };
  },

  methods: {
    openEditDialog(data) {
      this.visible = true;
      Object.assign(this.formData, data);
    },

    handleCancel() {
      this.visible = false;
    },
    handleOk() {
      this.visible = false;
      // this.saveData();
    },

    async saveData() {
      // let res = null;
      // const req = Object.assign({}, this.formData);
      // // const startDate = dayjs(formData.startDate_new).format('YYYY-MM-DD')
      // if (this.isAdd) {
      //   res = await this.addFun(req);
      // } else {
      //   res = await this.saveFun(req);
      // }
      // if (res.success) {
      //   if (this.clickQuery) {
      //     res = await this.clickQuery();
      //   }
      // } else {
      //   this.$message.error(res.rtn_message);
      // }
    },
  },
};
</script>